package net.pws.oos.biz.query.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import net.pws.common.persistence.QueryRepository;
import net.pws.oos.biz.model.Dict;
import net.pws.oos.biz.query.DictFinder;

@Service
@SuppressWarnings("unchecked")
public class DefaultDictFinder extends AbstractFinder implements DictFinder {
    
    @Override
    public List<Dict> listDicts(String type) {
        String hql = QueryRepository.getInstance().get("hql.listDict");
        return entityManager.findList(hql, new Object[] { type });
    }
    
}
